home *** CD-ROM | disk | FTP | other *** search
/ Mac Format 1995 June / MacFormat 25.iso / Shareware City / Developers / OutOfPhase1.1 Source / OutOfPhase Folder / InstrObject.h < prev    next >
Text File  |  1994-05-28  |  3KB  |  102 lines

  1. /* InstrObject.h */
  2.  
  3. #ifndef Included_InstrObject_h
  4. #define Included_InstrObject_h
  5.  
  6. /* InstrObject module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* BinaryCodedDecimal */
  12. /* InstrWindow */
  13. /* InstrList */
  14. /* Memory */
  15. /* DataMunging */
  16. /* BuildInstrument */
  17. /* InstrumentStructure */
  18. /* DataMunging */
  19. /* Numbers */
  20. /* Alert */
  21. /* MainWindowStuff */
  22. /* BufferedFileInput */
  23. /* BufferedFileOutput */
  24.  
  25. #include "BinaryCodedDecimal.h"
  26. #include "MainWindowStuff.h"
  27.  
  28. struct InstrObjectRec;
  29. typedef struct InstrObjectRec InstrObjectRec;
  30.  
  31. /* forward declarations */
  32. struct CodeCenterRec;
  33. struct MainWindowRec;
  34. struct InstrListRec;
  35. struct InstrumentRec;
  36.  
  37. /* create a new empty instrument object */
  38. InstrObjectRec*                NewInstrObject(struct CodeCenterRec* CodeCenter,
  39.                                                 struct MainWindowRec* MainWindow, struct InstrListRec* InstrList);
  40.  
  41. /* dispose of instrument object and all the crud it contains */
  42. void                                    DisposeInstrObject(InstrObjectRec* InstrObj);
  43.  
  44. /* find out if the object has been changed */
  45. MyBoolean                            HasInstrObjectBeenModified(InstrObjectRec* InstrObj);
  46.  
  47. /* indicate that object has been modified */
  48. void                                    InstrObjHasBeenModified(InstrObjectRec* InstrObj);
  49.  
  50. /* unbuild the instrument */
  51. void                                    UnbuildInstrObject(InstrObjectRec* InstrObj);
  52.  
  53. /* build the instrument.  returns True if successful */
  54. MyBoolean                            BuildInstrObject(InstrObjectRec* InstrObj);
  55.  
  56. /* make instrument up to date */
  57. MyBoolean                            MakeInstrObjectUpToDate(InstrObjectRec* InstrObj);
  58.  
  59. /* find out if the instrument object is up to date */
  60. MyBoolean                            IsIntrumentObjectUpToDate(InstrObjectRec* InstrObj);
  61.  
  62. /* get the definition of the instrument */
  63. struct InstrumentRec*    GetInstrObjectRawData(InstrObjectRec* InstrObj);
  64.  
  65. /* get a copy of the instrument's name */
  66. char*                                    InstrObjectGetNameCopy(InstrObjectRec* InstrObj);
  67.  
  68. /* install a new name.  the object becomes the owner of the name */
  69. void                                    InstrObjectPutName(InstrObjectRec* InstrObj, char* Name);
  70.  
  71. /* get the text definition of the object */
  72. char*                                    InstrObjectGetDefinitionCopy(InstrObjectRec* InstrObj);
  73.  
  74. /* put a new definition of the instrument.  it becomes owner of the block */
  75. void                                    InstrObjectPutDefinition(InstrObjectRec* InstrObj, char* NewDef);
  76.  
  77. /* display the editor window for this object or bring it to the top */
  78. MyBoolean                            InstrObjectOpenWindow(InstrObjectRec* InstrObj);
  79.  
  80. /* notify the object that the window has disappeared.  The object does not */
  81. /* perform any actions */
  82. void                                    InstrObjectWindowCloseNotify(InstrObjectRec* InstrObj,
  83.                                                 short NewX, short NewY, short NewWidth, short NewHeight);
  84.  
  85. /* the document's name changed, so we need to update the window */
  86. void                                    InstrObjectGlobalNameChange(InstrObjectRec* InstrObj,
  87.                                                 char* NewFilename);
  88.  
  89. /* create a new object from data in the file. */
  90. FileLoadingErrors            InstrObjectNewFromFile(InstrObjectRec** ObjectOut,
  91.                                                 struct BufferedInputRec* Input, struct CodeCenterRec* CodeCenter,
  92.                                                 struct MainWindowRec* MainWindow, struct InstrListRec* InstrList);
  93.  
  94. /* write the data in the object to the file. */
  95. FileLoadingErrors            InstrObjectWriteDataOut(InstrObjectRec* InstrObj,
  96.                                                 struct BufferedOutputRec* Output);
  97.  
  98. /* mark the instrument object as saved */
  99. void                                    InstrObjectMarkAsSaved(InstrObjectRec* InstrObj);
  100.  
  101. #endif
  102.